<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateOrderTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('order', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->bigInteger('order_id')->comment('订单号');
            $table->string('product_version')->comment('商品版本(qq or wechat)');
            $table->string('ways_purchase')->comment('购买方式(android or ios)');
            $table->string('server')->comment('所在服务器');
            $table->string('game_id')->comment('游戏id');
            $table->string('contact_details')->comment('联系方式');
            $table->integer('status')->comment('订单状态(0:未处理 1:已完成 2:处理失败)');
            $table->string('remark')->nullable()->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('order');
    }
}
